/*
编写 : Hexh
时间 : 2012-5-7 10:29:53
*/
using System.Collections.Generic;
using FsCarInfo.Core.Entity;
using FsCarInfo.Core.Entity.IRespositories;
using HMIS.FrameWork.DomainBase;

namespace FsCarInfo.Facade.Impl
{
	/// <summary>
	///	 the impl of IFsBcarFacade
	/// </summary>
	public class FsBcarFacadeImpl : IFsBcarFacade
	{

		private readonly IFsBcarRepository FsBcarRepository;

		public FsBcarFacadeImpl(IFsBcarRepository FsBcarRepository)
        {
			this.FsBcarRepository = FsBcarRepository;
        }

        #region IFsBcar Entity Save,Get,Update,Delete

		public FsBcar Get(string id)
		{
			return FsBcarRepository.Get(id);
		}

		public FsBcar Load(string id)
		{
			return FsBcarRepository.Load(id);
		}

		public void SaveOrUpdate(FsBcar entity)
		{
			this.FsBcarRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			FsBcarRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			FsBcarRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return FsBcarRepository.IsFieldExist(fieldName, fieldValue, id);
		}
		
		#endregion
		
		#region Query 

		public IList<FsBcar> GetAll()
		{
			return FsBcarRepository.GetAll();
		}

		public IList<FsBcar> GetPlist(int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
        {
			return FsBcarRepository.GetPlist(start, limit, sort, dir, filters, out total);
        }
		
		#endregion
	}
}
